package com.wn.demo02;

/**
 * @author yellow Docter
 * @date 2024-07-09
 * @desc 蜗牛创想：www.woniuxy.com
 */
public class Demo02 {

    public static void main(String[] args) {

        double price = 300d;
        int num = 5;

        //计算总价
        double total = price * num;

        if (total > 1000){
            double pay = total * 0.8d;
            System.out.println("实际付款金额:" + pay);
        }
    }

}
